<?php

namespace common\models\kingdee;

use Yii;

/**
 * This is the model class for table "T_PM_USER".
 *
 * @property string $FID
 * @property string $FNUMBER
 * @property string $FNAME_L1
 * @property string $FNAME_L2
 * @property string $FNAME_L3
 * @property integer $FTYPE
 * @property string $FDESCRIPTION_L1
 * @property string $FDESCRIPTION_L2
 * @property string $FDESCRIPTION_L3
 * @property string $FPASSWORD
 * @property integer $FISDELETE
 * @property integer $FISLOCKED
 * @property integer $FFORBIDDEN
 * @property string $FEFFECTIVEDATE
 * @property string $FINVALIDATIONDATE
 * @property string $FDEFAULTLOCALE
 * @property integer $FISREGISTER
 * @property integer $FERRCOUNT
 * @property string $FGROUPID
 * @property string $FPERSONID
 * @property string $FSECURITYID
 * @property string $FPWEFFECTIVEDATE
 * @property string $FLOCKEDTIME
 * @property integer $FISBIZADMIN
 * @property integer $FISCHANGEDPW
 * @property string $FDEFORGUNITID
 * @property string $FCONTROLUNITID
 * @property string $FCREATORID
 * @property string $FCREATETIME
 * @property string $FLASTUPDATEUSERID
 * @property string $FLASTUPDATETIME
 * @property string $FCUSTOMERID
 * @property string $FSUPPLIERID
 * @property string $FMAINROLEID
 * @property integer $FAGENTUSER
 * @property integer $FLOGINAUTHORWAY
 * @property string $FPWDHISSTR
 * @property string $FREFERID
 * @property string $FCELL
 * @property string $FBACKUPEMAIL
 * @property string $FHOMEPHONE
 * @property string $FOFFICEPHONE
 * @property string $FEMAIL
 * @property string $FADNUMBER
 * @property string $FNAMEPINYIN
 * @property string $FNAMESHORTPINYIN
 * @property string $FPINYIN
 * @property string $FSHORTPINYIN
 * @property integer $FISACTIVATE
 * @property string $FUID
 * @property integer $FISSYNTOCLOUD
 */
class PmUser extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'T_PM_USER';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_hr');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['FID', 'FTYPE'], 'required'],
            [['FTYPE', 'FISDELETE', 'FISLOCKED', 'FFORBIDDEN', 'FISREGISTER', 'FERRCOUNT', 'FISBIZADMIN', 'FISCHANGEDPW', 'FAGENTUSER', 'FLOGINAUTHORWAY', 'FISACTIVATE', 'FISSYNTOCLOUD'], 'integer'],
            [['FEFFECTIVEDATE', 'FINVALIDATIONDATE', 'FPWEFFECTIVEDATE', 'FLOCKEDTIME', 'FCREATETIME', 'FLASTUPDATETIME'], 'safe'],
            [['FID', 'FGROUPID', 'FPERSONID', 'FSECURITYID', 'FDEFORGUNITID', 'FCONTROLUNITID', 'FCREATORID', 'FLASTUPDATEUSERID', 'FCUSTOMERID', 'FSUPPLIERID', 'FMAINROLEID', 'FREFERID'], 'string', 'max' => 44],
            [['FNUMBER', 'FNAME_L1', 'FNAME_L2', 'FNAME_L3', 'FDESCRIPTION_L1', 'FDESCRIPTION_L2', 'FDESCRIPTION_L3', 'FPASSWORD', 'FCELL', 'FBACKUPEMAIL', 'FHOMEPHONE', 'FOFFICEPHONE', 'FEMAIL'], 'string', 'max' => 240],
            [['FDEFAULTLOCALE'], 'string', 'max' => 80],
            [['FPWDHISSTR'], 'string', 'max' => 200],
            [['FADNUMBER', 'FNAMEPINYIN', 'FNAMESHORTPINYIN', 'FPINYIN', 'FSHORTPINYIN'], 'string', 'max' => 255],
            [['FUID'], 'string', 'max' => 132],
            [['FID', 'FID', 'FID', 'FID'], 'unique', 'targetAttribute' => ['FID', 'FID', 'FID', 'FID'], 'message' => 'The combination of  and Fid has already been taken.'],
            [['FID', 'FID', 'FID', 'FID', 'FTYPE', 'FTYPE', 'FTYPE', 'FTYPE'], 'unique', 'targetAttribute' => ['FID', 'FID', 'FID', 'FID', 'FTYPE', 'FTYPE', 'FTYPE', 'FTYPE'], 'message' => 'The combination of Fid and Ftype has already been taken.'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'FID' => Yii::t('kingdee', 'Fid'),
            'FNUMBER' => Yii::t('kingdee', 'Fnumber'),
            'FNAME_L1' => Yii::t('kingdee', 'Fname  L1'),
            'FNAME_L2' => Yii::t('kingdee', 'Fname  L2'),
            'FNAME_L3' => Yii::t('kingdee', 'Fname  L3'),
            'FTYPE' => Yii::t('kingdee', 'Ftype'),
            'FDESCRIPTION_L1' => Yii::t('kingdee', 'Fdescription  L1'),
            'FDESCRIPTION_L2' => Yii::t('kingdee', 'Fdescription  L2'),
            'FDESCRIPTION_L3' => Yii::t('kingdee', 'Fdescription  L3'),
            'FPASSWORD' => Yii::t('kingdee', 'Fpassword'),
            'FISDELETE' => Yii::t('kingdee', 'Fisdelete'),
            'FISLOCKED' => Yii::t('kingdee', 'Fislocked'),
            'FFORBIDDEN' => Yii::t('kingdee', 'Fforbidden'),
            'FEFFECTIVEDATE' => Yii::t('kingdee', 'Feffectivedate'),
            'FINVALIDATIONDATE' => Yii::t('kingdee', 'Finvalidationdate'),
            'FDEFAULTLOCALE' => Yii::t('kingdee', 'Fdefaultlocale'),
            'FISREGISTER' => Yii::t('kingdee', 'Fisregister'),
            'FERRCOUNT' => Yii::t('kingdee', 'Ferrcount'),
            'FGROUPID' => Yii::t('kingdee', 'Fgroupid'),
            'FPERSONID' => Yii::t('kingdee', 'Fpersonid'),
            'FSECURITYID' => Yii::t('kingdee', 'Fsecurityid'),
            'FPWEFFECTIVEDATE' => Yii::t('kingdee', 'Fpweffectivedate'),
            'FLOCKEDTIME' => Yii::t('kingdee', 'Flockedtime'),
            'FISBIZADMIN' => Yii::t('kingdee', 'Fisbizadmin'),
            'FISCHANGEDPW' => Yii::t('kingdee', 'Fischangedpw'),
            'FDEFORGUNITID' => Yii::t('kingdee', 'Fdeforgunitid'),
            'FCONTROLUNITID' => Yii::t('kingdee', 'Fcontrolunitid'),
            'FCREATORID' => Yii::t('kingdee', 'Fcreatorid'),
            'FCREATETIME' => Yii::t('kingdee', 'Fcreatetime'),
            'FLASTUPDATEUSERID' => Yii::t('kingdee', 'Flastupdateuserid'),
            'FLASTUPDATETIME' => Yii::t('kingdee', 'Flastupdatetime'),
            'FCUSTOMERID' => Yii::t('kingdee', 'Fcustomerid'),
            'FSUPPLIERID' => Yii::t('kingdee', 'Fsupplierid'),
            'FMAINROLEID' => Yii::t('kingdee', 'Fmainroleid'),
            'FAGENTUSER' => Yii::t('kingdee', 'Fagentuser'),
            'FLOGINAUTHORWAY' => Yii::t('kingdee', 'Floginauthorway'),
            'FPWDHISSTR' => Yii::t('kingdee', 'Fpwdhisstr'),
            'FREFERID' => Yii::t('kingdee', 'Freferid'),
            'FCELL' => Yii::t('kingdee', 'Fcell'),
            'FBACKUPEMAIL' => Yii::t('kingdee', 'Fbackupemail'),
            'FHOMEPHONE' => Yii::t('kingdee', 'Fhomephone'),
            'FOFFICEPHONE' => Yii::t('kingdee', 'Fofficephone'),
            'FEMAIL' => Yii::t('kingdee', 'Femail'),
            'FADNUMBER' => Yii::t('kingdee', 'Fadnumber'),
            'FNAMEPINYIN' => Yii::t('kingdee', 'Fnamepinyin'),
            'FNAMESHORTPINYIN' => Yii::t('kingdee', 'Fnameshortpinyin'),
            'FPINYIN' => Yii::t('kingdee', 'Fpinyin'),
            'FSHORTPINYIN' => Yii::t('kingdee', 'Fshortpinyin'),
            'FISACTIVATE' => Yii::t('kingdee', 'Fisactivate'),
            'FUID' => Yii::t('kingdee', 'Fuid'),
            'FISSYNTOCLOUD' => Yii::t('kingdee', 'Fissyntocloud'),
        ];
    }
}
